<template>
  <div>
    <gs-header :title="pageTitle"/>
    <div id="page-scroll-x-wrapper" class="page-scroll-x-wrapper">
      <ul class="scroll-content scroll-list">
        <li v-for="i in 50" :key="i" class="item">line({{i}})</li>
      </ul>
    </div>
  </div>
</template>

<script>
import GScroll from 'src'
import GsHeader from 'example/components/gs-header/gs-header'

export default {
  name: 'PageScrollX',
  components: {
    GsHeader
  },
  mounted () {
    this.scroll = new GScroll('page-scroll-x-wrapper', {
      scrollX: true,
      scrollY: false
    })
  },
  data () {
    return {
      pageTitle: '水平滚动'
    }
  }
}
</script>

<style lang="scss">
.page-scroll-x-wrapper {
  width: 100vw;
  overflow: hidden;
  .scroll-list {
    padding: 25px 0;
    white-space: nowrap;
    display: inline-block;
    .item {
      display: inline-block;
      padding: 15px;
      margin-right: 15px;
      color: grey;
      border: 1px solid grey;
      user-select: none;
    }
  }
}
</style>
